<?php
namespace app\api\controller\v1;

use app\api\controller\v1\BaseController;
use app\lib\Validate\ThemeGetIdValidate;
use app\api\model\Theme as ThemeModel;
use app\lib\Exception\ThemeException;

class ThemeController extends BaseController
{
    public function getTheme($ids = "")
    {
        $validate = new ThemeGetIdValidate();
        $validate->goCheck();
        $ids = explode(",",$ids);
        $result = ThemeModel::getThemeId($ids);
        if(!$result){
            throw new ThemeException();
        }

        return json($result);
    }
}